// Package article
// Created by GoLand
// @User: lenora
// @Date: 2024/1/27
// @Time: 17:25

package article

import (
	"context"
	"gorm.io/gorm"
)

type ReaderDao interface {
	//Upsert insert or update
	Upsert(ctx context.Context, art Articles) error
	UpsertV2(ctx context.Context, art PublishArticle) error
}

func NewGormReaderDao(db *gorm.DB) ReaderDao {
	return &GormReaderDao{db: db}
}

type GormReaderDao struct {
	db *gorm.DB
}

func (dao *GormReaderDao) Upsert(ctx context.Context, art Articles) error {
	//TODO implement me
	panic("implement me")
}

func (dao *GormReaderDao) UpsertV2(ctx context.Context, art PublishArticle) error {
	//TODO implement me
	panic("implement me")
}
